/*-------------------------------------------------------------------------------------------------------------------------
	Stop all current sounds
-------------------------------------------------------------------------------------------------------------------------*/

local PLUGIN = {}
PLUGIN.Title = "Stop Sounds"
PLUGIN.Description = "Stop the current sounds"
PLUGIN.Author = "Overv & Matt J"
PLUGIN.ChatCommand = "stopsounds"
PLUGIN.Privileges = { "Sound Stopping" }

function PLUGIN:Call( ply, args )
	if ( ply:EV_HasPrivilege( "Sound Stopping" ) ) then
		evolve:Notify( evolve.colors.blue, ply:Nick(), evolve.colors.white, " has stopped all current sounds." )
		
		for _, pl in ipairs( player.GetAll() ) do
			pl:SendLua('RunConsoleCommand("stopsounds")')
		end
	else
		evolve:Notify( ply, evolve.colors.red, evolve.constants.notallowed )
	end
end

evolve:RegisterPlugin( PLUGIN )